package mobi.hami.huapin.service.impl;

import mobi.hami.huapin.dao.FoodSortMapper;
import mobi.hami.huapin.dao.ProductMapper;
import mobi.hami.huapin.model.FoodSort;
import mobi.hami.huapin.service.FoodSortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodSortServiceImpl implements FoodSortService {
    @Autowired
    private FoodSortMapper foodSortMapper;
    public     int add(FoodSort foodSort){
        return  foodSortMapper.insert(foodSort);
    }
    public  List<FoodSort> getLevelList(int level){
        return  foodSortMapper.getLevelList(level);

    }
    public   int deleteTree(String ids ){

        return  foodSortMapper.deleteTree(ids);
    }

    @Override
    public FoodSort selectOnbyid(Integer id) {
        return  foodSortMapper.selectByPrimaryKey(id);
    }


}
